/**
 * Created by shunchen_yang on 16/10/25.
 */
UE.registerUI('xiumi', (editor, uiName) => {
    const btn = new UE.ui.Button({
        name: uiName,
        title: '秀米',
        cssRules: 'background-image: url("/UEditorPlus/xiumi/xiumi.png") !important;background-size: 16px 16px;',
        onclick() {
            var dialog = new UE.ui.Dialog({
                iframeUrl: '/UEditorPlus/xiumi/xiumi-ue-dialog-v5.html',
                editor,
                name: 'xiumi-connect',
                title: "秀米",
                cssRules: "width: " + (window.innerWidth - 60) + "px;" + "height: " + (window.innerHeight - 60) + "px;",
            });
            dialog.render();
            dialog.open();
        }
    });
    return btn;
});